package com.zhangjian.test1;

public class ThreadTest{
    public static void main(String[] args) {
        Thread thread=  new Thread(
                () ->{
                    for (int i = 0; i < 10; i++) {
                        try {
                            Thread.sleep(1000);
                            System.out.println(Thread.currentThread().getName());
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }
        );
        thread.start();
    }
}
